/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package rigo.ricard.pris.rs.ac.uns.dmi.service.persistence;

import com.liferay.portal.service.persistence.BasePersistence;

import rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture;

/**
 * The persistence interface for the car picture service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Rigo Richard
 * @see CarPicturePersistenceImpl
 * @see CarPictureUtil
 * @generated
 */
public interface CarPicturePersistence extends BasePersistence<CarPicture> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link CarPictureUtil} to access the car picture persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the car picture in the entity cache if it is enabled.
	*
	* @param carPicture the car picture
	*/
	public void cacheResult(
		rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture carPicture);

	/**
	* Caches the car pictures in the entity cache if it is enabled.
	*
	* @param carPictures the car pictures
	*/
	public void cacheResult(
		java.util.List<rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture> carPictures);

	/**
	* Creates a new car picture with the primary key. Does not add the car picture to the database.
	*
	* @param carPicureId the primary key for the new car picture
	* @return the new car picture
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture create(
		long carPicureId);

	/**
	* Removes the car picture with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param carPicureId the primary key of the car picture
	* @return the car picture that was removed
	* @throws rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException if a car picture with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture remove(
		long carPicureId)
		throws com.liferay.portal.kernel.exception.SystemException,
			rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException;

	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture updateImpl(
		rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture carPicture,
		boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the car picture with the primary key or throws a {@link rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException} if it could not be found.
	*
	* @param carPicureId the primary key of the car picture
	* @return the car picture
	* @throws rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException if a car picture with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture findByPrimaryKey(
		long carPicureId)
		throws com.liferay.portal.kernel.exception.SystemException,
			rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException;

	/**
	* Returns the car picture with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param carPicureId the primary key of the car picture
	* @return the car picture, or <code>null</code> if a car picture with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture fetchByPrimaryKey(
		long carPicureId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the car pictures where adId = &#63;.
	*
	* @param adId the ad ID
	* @return the matching car pictures
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture> findByAdId(
		long adId) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the car pictures where adId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param adId the ad ID
	* @param start the lower bound of the range of car pictures
	* @param end the upper bound of the range of car pictures (not inclusive)
	* @return the range of matching car pictures
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture> findByAdId(
		long adId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the car pictures where adId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param adId the ad ID
	* @param start the lower bound of the range of car pictures
	* @param end the upper bound of the range of car pictures (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching car pictures
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture> findByAdId(
		long adId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first car picture in the ordered set where adId = &#63;.
	*
	* @param adId the ad ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching car picture
	* @throws rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException if a matching car picture could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture findByAdId_First(
		long adId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException;

	/**
	* Returns the first car picture in the ordered set where adId = &#63;.
	*
	* @param adId the ad ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching car picture, or <code>null</code> if a matching car picture could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture fetchByAdId_First(
		long adId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last car picture in the ordered set where adId = &#63;.
	*
	* @param adId the ad ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching car picture
	* @throws rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException if a matching car picture could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture findByAdId_Last(
		long adId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException;

	/**
	* Returns the last car picture in the ordered set where adId = &#63;.
	*
	* @param adId the ad ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching car picture, or <code>null</code> if a matching car picture could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture fetchByAdId_Last(
		long adId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the car pictures before and after the current car picture in the ordered set where adId = &#63;.
	*
	* @param carPicureId the primary key of the current car picture
	* @param adId the ad ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next car picture
	* @throws rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException if a car picture with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture[] findByAdId_PrevAndNext(
		long carPicureId, long adId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			rigo.ricard.pris.rs.ac.uns.dmi.NoSuchCarPictureException;

	/**
	* Returns all the car pictures.
	*
	* @return the car pictures
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the car pictures.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of car pictures
	* @param end the upper bound of the range of car pictures (not inclusive)
	* @return the range of car pictures
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the car pictures.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of car pictures
	* @param end the upper bound of the range of car pictures (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of car pictures
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<rigo.ricard.pris.rs.ac.uns.dmi.model.CarPicture> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the car pictures where adId = &#63; from the database.
	*
	* @param adId the ad ID
	* @throws SystemException if a system exception occurred
	*/
	public void removeByAdId(long adId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the car pictures from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of car pictures where adId = &#63;.
	*
	* @param adId the ad ID
	* @return the number of matching car pictures
	* @throws SystemException if a system exception occurred
	*/
	public int countByAdId(long adId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of car pictures.
	*
	* @return the number of car pictures
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;
}